package string;

public class MatchesDemo06 {
    public static void main(String[] args) {

        //\w+@\w+(\.\w{2,})+
        String email = "liucangsong@tedu.com.cn";
        boolean match = email.matches("\\w+@\\w+(\\.\\w{2,})+");
        if(match){
            System.out.println("这个邮箱地址正确");
        }else{
            System.out.println("邮箱地址错误");
        }
    }
}
